Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for BOOLEAN column type #34

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Support for BOOLEAN column type #34

wants to merge 3 commits into from

Conversation

SirPL
Copy link

@SirPL SirPL commented Jun 30, 2022

From MySQL perspective the boolean is an alias for tinyint.

@muglug
Copy link
Collaborator

muglug commented Jun 30, 2022

Mind fixing the Psalm errors?

Fixed most of Psalm issues
Boolean values are internally stored as integers
@SirPL
Copy link
Author

SirPL commented Jun 30, 2022

I fixed all Psalm issues but one. I understand why Psalm is complaining about $this->getDefault() returning mixed value which is then converted to string. I don't understand why the very same piece of code isn't failing in other Column types, i.e. src/Schema/Column/IntegerColumnTrait.php:63-69.

I would appreciate a helping hand and getting an explanation why I see such discrepancy.

@Kenneth-Sills
Copy link
Contributor

@SirPL I know it's been a while, so not sure if you still care to work on this, but there's no discrepancy. IntegerColumnTrait is just being explicitly ignored.

I think Psalm should will be satisfied if you just (string) $this->getDefault()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants